Python Matplotlib Interview Questions and Answers
Question: Explain the difference between `plt.plot()` and `plt.scatter()`.Answer: `plt.plot()` connects data points with lines, while `plt.scatter()` shows individual data points without connecting them.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users:
- How can you add labels to the x-axis and y-axis in a Matplotlib plot?
- Explain the purpose of the `plt.grid()` function in Matplotlib.